<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>H+ 后台主题UI框架 - 空白页</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
    <link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__STATIC__/layout/css/font-awesome.css?v=4.4.0" rel="stylesheet">
     <!-- jqgrid-->
    <link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
    <link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <style>
		.is_hiddenTr{display: none;}
    </style>
</head>

<body style="color:#333;padding:3px;">
    <!-- 标题 -->
    <div class="page-heade">
        <h2 class="title_color text-center">请选择网点</h2>
    </div>
    <!-- 标题 -->
    <div class="row-margin-top">
    <form action=""  class="form-inline">
      <table class="row-margin-top tab-content table-bordered  table" border="1">
          <tr>
            <td style="min-width: 120px;width: 120px"><label for="" class="form-label">网点分区</label></td>
            <td><input type="text" class="form-control" name=""></td>
            <td style="min-width: 120px;width: 120px"><label for="" class="form-label">网点省份</label></td>
            <td><input type="text" class="form-control" name=""></td>
             <td style="min-width: 120px;width: 120px"><label for="" class="form-label">网点城市</label></td>
            <td><input type="text" class="form-control" name=""></td>
            </tr>
            <tr>
            <td style="min-width: 120px;width: 120px"><label for="" class="form-label">经销商编号</label></td>
            <td><input type="text" class="form-control" name=""></td>
            <td style="min-width: 120px;width: 120px"><label for="" class="form-label">经销商名称</label></td>
            <td><input type="text" class="form-control" name=""></td>
             <td style="min-width: 120px;width: 120px"><label for="" class="form-label">系统名称</label></td>
            <td><input type="text" class="form-control" name=""></td>
            </tr>
             <tr>
               <td style="min-width: 120px;width: 120px"><label for="" class="form-label">网点名称</label></td>
               <td><input type="text" class="form-control" name=""></td>
              <td colspan="4" class="text-center">
              <button class="btn btn-info query">查询</button>
              <button class="btn btn-info emptyIf" type="button">清空查询条件</button>
            </td>
            </tr>
      </table>
      <table class="table table-striped table-bordered text-center" id="verifytable">
          <tr class="info text-center">
            <th style="vertical-align: middle !important;text-align: center;><input type="checkbox" id="checkAll">全选</th>
            <th class="text-center">序号</th>
            <th class="text-center">经销商编号</th>
            <th class="text-center">经销商</th>
            <th class="text-center">经销商是否为直营</th>
            <th class="text-center">系统名称</th>
            <th class="text-center">网点名称</th>
          </tr>
          <tbody>
              <tr>
              		<td align="center"><input type="checkbox" name="items"></td>
                    <td>1</td>
                    <td>CU00011</td>
                    <td><a href="javascript:;" class="J_menuItem" title="经销商详情">广州市汇佳嘉贸易有限公司</a></td>
                    <td>否</td>
                    <td><a href="javascript:;" class="J_menuItem" title="系统详情">广东华润万家</a></td>
                    <td><a href="javascript:;" class="J_menuItem" title="网点详情">广州华润万家天河公园分店</a></td>
              </tr>
               <tr>
                  <td align="center"><input type="checkbox" name="items"></td>
                    <td>2</td>
                    <td>CU00011</td>
                    <td><a href="javascript:;" class="J_menuItem" title="经销商详情">广州市汇佳嘉贸易有限公司</a></td>
                    <td>否</td>
                    <td><a href="javascript:;" class="J_menuItem" title="系统详情">广东华润万家</a></td>
                    <td><a href="javascript:;" class="J_menuItem" title="网点详情">广州华润万家天河公园分店</a></td>
              </tr>
          </tbody>
      </table>
      <div class="row text-center no-padding">
            <button class="btn btn-success" type="button" id="subBtn">提交</button>
            <button class="btn btn-info" type="button" onclick="back()">返回</button>
        </div>
</form>
    </div>
    <!-- 全局js -->
    <script src="__STATIC__/layout/js/jquery.min.js?v=2.1.4"></script>
    <script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
    <!-- <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script> -->
    <script src="__STATIC__/layout/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
    <script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
     <script src="__STATIC__/layout/js/common.js"></script>
    <script>
        function back(){
          history.go(-1);
        }
     
        $(document).ready(function(){
            // $("#verifytable tbody tr td").find('.duigou')
          /*格式化数字金额*/
          var $ObjectNum =$(".ObjectNum");
             toNum($ObjectNum);
          /*为已生效的核销申请字体加粗*/
            // var $duigou =$(".duigou");
            //  $duigou.parent().addClass("font-bold");

/*设置允许解锁*/
        $("#subBtn").click(function() {
            // $("#alert_addNewZone").show();
            var $items = $("[name=items]:checkbox")
            if ($items.filter(':checked').length < 1) {
                sweetAlert("", "请选择一条网点数据！", "error");
            } else {
               location.href="newguidenet_add.html"
            }
        });

/*弹出隐藏的tr*/
          /*table表格操作*/
      $("#checkAll").click(function() {

            $("[name=items]:checkbox").prop("checked", $(this).prop("checked"));
            if ($("[name=items]:checkbox").prop("checked") != true) {
                // console.log($(this))
                $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#fff")
            } else {
                $("[name=items]:checkbox").parents("tr").css("backgroundColor", "#f8f800")

            }
        })
        $("[name=items]:checkbox").click(function() {
            //定义一个临时变量，避免重复使用同一个选择器选择页面中的元素，提高程序效率
            // console.log(1)
            var $tmp = $("[name=items]:checkbox");
            if ($(this).prop("checked") != true) {
                // console.log($(this))
                $(this).parent().parent().css("backgroundColor", "#fff")
            } else {
                $(this).parent().parent().css("backgroundColor", "#f8f800")

            }
            //用filter()方法筛选出选中的复选框，并直接给CheckedAll赋值
            $("#checkAll").prop('checked', $tmp.length == $tmp.filter(':checked').length);

          })
        })
         
    </script>
</body>

</html>
